<template>
    <van-tag :type="type.status" class="tag-" plain>{{ type.text }}</van-tag>
</template>

<script>
export default {
    props: {
        uid: {
            type: String | Number,
            default: 1
        },
        ltd_level: {
            type: Number,
            default: 0
        }
    },
    computed: {
        type () {
            if (this.uid === 0) {
                return {
                    status: 'primary',
                    text: '自营'
                }
            } else {
                if (this.ltd_level === 1) {
                    return {
                        status: 'primary',
                        text: '授权经销商'
                    }
                } else {
                    return {
                        status: 'danger',
                        text: '渠道商'
                    }
                }
            }
        }
    }
}
</script>

<style lang="less" scoped>

</style>
